import { useRef } from "react"

// 防抖
export const useFd = () => {
          const time = useRef(null)
          function aa(ac) {
                    return (...reg) => {
                              clearTimeout(time.current)
                              time.current = setTimeout(() => {
                                        ac(...reg)
                              }, 2000)

                    }

          }
          return aa
}